using System;
using UnityEngine;
using UnityEngine.UI;

namespace Brick
{
	public class Enemy : MonoBehaviour
	{
		private Text number;

		private void Start()
		{
			number = GetComponentInChildren<Text>();
		}

		private void Update()
		{
			if (Convert.ToInt32(number.text) < 1)
			{
				UnityEngine.Object.Destroy(base.gameObject);
			}
		}
	}
}

